package GUI窗体和Swing.FlowLayout流式布局管理器;
import javax.swing.JFrame;
import javax.swing.JButton;
import java.awt.FlowLayout;

public class text {
    public static void main(String[] args) {
        JFrame jf = new JFrame();
        jf.setBounds(100, 100, 450, 300);
        jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        jf.setVisible(true);
        jf.setLayout(new FlowLayout());
        for (int i = 0; i < 10; i++) {
            jf.add(new JButton("按钮" + i));
        }
    }
}
